package com.mallcai.bigdata.ladon.service.report.impl.handler.support.rule;

import com.mallcai.bigdata.ladon.dpl.vo.DataType;

import java.util.Objects;

/**
 * @author feixy
 * @version 1.0
 * @date 2019-07-21 22:57
 */
public class IsNotNullRuleOperator extends AbstractSingleRuleOperator {

    private static String[] commands = {"is not null"};

    @Override
    protected boolean test(Object obj1) {
        return !Objects.isNull(obj1);
    }

    @Override
    public DataType[] getSupportDataTypes() {
        return IRuleOperator.ALL_DATA_TYPE;
    }

    @Override
    public String[] getCommands() {
        return commands;
    }
}
